home *** CD-ROM | disk | FTP | other *** search
/ Software 2000 / Software 2000 Volume 1 (Disc 1 of 2).iso / utilities / u136.dms / in.adf / VCOMMANDS / VCommands.DOC < prev    next >
Encoding:
Text File  |  1978-08-30  |  4.0 KB  |  98 lines

  1.                             --- VCOMMANDS ---
  2.                   --- Written by Yogesh Raja 1989 ---
  3.  
  4.    There are 8 programs on this disk, all starting with the letter V to make
  5. them distinguishable. They all allow string handling and manipulation
  6. within AmigaDOS.
  7.    As you may know, the only command that allows input on a normal disk is
  8. the ASK command. However, it only allows the input of two letters, Y or N.
  9. The programs here will allow input and processing of a string of characters
  10. to a maximum of 80 characters. There are 26 possible variables each being
  11. able to hold 80 characters. The variables are labelled A-Z.
  12.    The commands are:-
  13.  
  14. VInput
  15. VLet
  16. VPrint
  17. VCls
  18. VCompare
  19. VQuickCmp
  20. VUpper
  21. VClear
  22.  
  23.    VInput gives a prompt for input, rather than immediately transferring a
  24. string specified from CLI. You may, if you wish, specify a string for the
  25. program to display before awaiting input. The string should be enclosed in
  26. quotes. For example:- 'VInput "What is your name",a' will display the
  27. following:
  28.  
  29. What is your name?
  30. *input is accepted here*
  31.  
  32. You can, instead of a comma, put a '|' character (found on the key to the
  33. left of BACKSPACE). This will await input on the same line as the specified
  34. string. For example, 'VInput "Name >"|a' will display the following:
  35.  
  36. Name >*input is accepted here*
  37.  
  38. Specifying just a variable, eg 'VInput j' will display a greater-than sign
  39. and wait for the input, which will be put into the specified variable (in
  40. the example's case, variable J.) Eg, '> *input here*'
  41.  
  42.    VLet is simple - it just puts a CLI specified string into a specified
  43. variable. It will also transfer variable to variable. For instance:
  44. 'VLet "Motorola",q' will put the string 'Motorola' into variable Q.
  45. Similarly, 'VLet q,a' will copy the string in variable Q into variable A.
  46.  
  47.    VPrint will allow you to display a combination of CLI specified strings
  48. and strings in specified variables, for instance: If variable A contains the
  49. string 'ST Amiga Format', the command 'VPrint "I buy "a" every month!" will
  50. display:
  51.  
  52. I buy ST Amiga Format every month!
  53.  
  54. Straight after closing quotes the variable may be specified without any
  55. other characters. However, if a comma is specified after a string OR a
  56. variable, effectively anywhere in the command, a carriage return will be
  57. executed at that point before any further printing. For instance, in the
  58. above example's case, the command 'VPrint "Variable A contains",a"!"' will
  59. do the following:
  60.  
  61. Variable A contains
  62. ST Amiga Format!
  63.  
  64.    VCls simply clears the CLI screen and returns the prompt to the top. This
  65. command might be handy if the screen looks cluttered up and causes
  66. confusion.
  67.  
  68.    VCompare allows comparison of a CLI specified string and a variable or
  69. two variables. The IF command already on all Workbench disks can be used
  70. with this command just as it is used with the ASK command. If a comparison
  71. with VCompare is affirmative, the case for IF WARN will be true, otherwise
  72. the case for IF NOT WARN will be true.
  73.    Examples:-
  74. 'VCompare "HELLO",a' will compare the string 'HELLO' with the string in
  75. variable A.
  76. 'VCompare a,b' will compare the string in variable A with the string in
  77. variable B.
  78.  
  79.    VQuickCmp is the same as VCompare, except it is used within CLI and not a
  80. command file like VCompare. It is helpful if you want to see whether two
  81. variables are the same instead of VPrinting the two variables and comparing
  82. by eye. The program will respond with a "Text same" or "Text not the same"
  83. message.
  84.  
  85.    VUpper will convert the string in a specified variable to upper-case. If
  86. variable P contains the string "arTifiCIal intelligence", 'VUpper P' will
  87. change the string to "ARTIFICIAL INTELLIGENCE".
  88.  
  89.    VClear will clear all data in all variables and deallocate the 2.03K used
  90. for string storage back to the system.
  91.  
  92.    You can type a question mark after any of the VCommands if you want a
  93. quick reference to the syntax for that command (except for VClear and VCls
  94. as they do not require parameters.)
  95.  
  96.    Finally, well done to HiSoft for creating something extremely valuable to
  97. me - Devpac Amiga Version 2. Superb piece of programming.
  98.